\subsection{Definition}
\begin{definition}
	A field \( K \) is \emph{algebraically closed} if every non-constant polynomial over \( K \) splits into linear factors over \( K \).
\end{definition}
\begin{remark}
	An equivalent condition is that the only irreducible polynomials are linear.
\end{remark}
\begin{example}
	The complex numbers \( \mathbb C \) form an algebraically closed field due to the fundamental theorem of algebra.
\end{example}
\begin{proposition}
	The following are equivalent.
	\begin{enumerate}
		\item \( K \) is algebraically closed.
		\item If \( L / K \) is a field extension and \( x \in L \) is algebraic over \( K \), then \( x \in K \).
		\item If \( L / K \) is an algebraic extension, \( L = K \).
	\end{enumerate}
\end{proposition}
\begin{proof}
	\emph{(i) implies (ii).}
	Let \( L / K \) be a field extension and \( x \in L \) algebraic over \( K \).
	Let \( f \) be the minimal polynomial for \( x \) over \( K \).
	Then \( f \) is linear, so \( x \in K \).

	\emph{(ii) implies (iii).}
	An extension \( L / K \) is algebraic when all \( x \in L \) are algebraic over \( K \).
	So \( x \in K \) by (ii).

	\emph{(iii) implies (i).}
	Let \( f \) be an irreducible polynomial, and \( L = \faktor{K[T]}{(f)} \), so \( L / K \) is a finite algebraic extension.
	Then \( L = K \), so \( f \) is linear.
\end{proof}
\begin{proposition}
	Let \( L / K \) be an algebraic extension such that every irreducible polynomial \( f \in K[T] \) splits into linear factors in \( L \).
	Then \( L \) is algebraically closed.
\end{proposition}
Such a field is called an \emph{algebraic closure} of \( K \).
\begin{proof}
	Let \( M / L \) be an extension, and let \( x \in M \) be algebraic over \( L \).
	Then \( x \) is algebraic over \( K \).
	By hypothesis, its minimal polynomial \( m_{x,K} \in K[T] \) splits into linear factors over \( L \).
	So \( x \in L \).
	By criterion (ii) in the previous proposition, \( L \) is algebraically closed.
\end{proof}
\begin{remark}
	An algebraic closure of \( K \) is the same as an algebraic extension of \( K \) which is algebraically closed.
\end{remark}
\begin{corollary}
	The field \( \overline{\mathbb Q} \) of algebraic complex numbers is algebraically closed.
	In particular, \( \overline{\mathbb Q} \) is an algebraic closure of \( \mathbb Q \).
\end{corollary}
\begin{proof}
	We apply the previous result to the extension \( \overline{\mathbb Q} / \mathbb Q \).
	The extension is algebraic, so it suffices to check that every irreducible polynomial \( f \in \mathbb Q[T] \) splits into linear factors in \( \overline{\mathbb Q} \).
	By the fundamental theorem of algebra, \( f \) splits in \( \mathbb C \).
	By definition of \( \overline{\mathbb Q} \), we have \( f = \prod (T - x_i) \) where each \( x_i \in \overline{\mathbb Q} \) as required.
\end{proof}

\subsection{Algebraic closures of countable fields}
\begin{proposition}
	Let \( K \) be a countable field.
	Then \( K \) has an algebraic closure.
\end{proposition}
\begin{proof}
	If \( K \) is a countable field, then \( K[T] \) is a countable ring.
	We will enumerate the monic irreducible polynomials \( f_i \in K[T] \) for \( i \geq 1 \).
	Let \( L_0 = K \), and inductively define \( L_i \) to be a splitting field for \( f_i \) over \( L_{i-1} \).

	One can perform this in such a way that no choices need to be made in the construction of the splitting fields.
	We may also assume that \( L_{i-1} \subseteq L_i \) for each \( i \geq 1 \), because if \( \sigma \colon L_{i-1} \to L_i \) is the extension, we can replace \( L_i \) with \( L_{i-1} \sqcup (L_i \setminus \sigma(L_{i-1})) \).
	Let \( L = \bigcup L_i \) be their union.
	By construction, every \( f_i \) splits in \( L \), so \( L \) is an algebraic closure of \( K \).
\end{proof}
\begin{example}
	\( \mathbb F_p \) has an algebraic closure.
\end{example}

\subsection{Zorn's lemma}
For a general field, we need to apply some set-theoretic machinery.
\begin{definition}
	A binary relation \( \preceq \) on a set \( S \) is a \emph{partial order} if it is reflexive, transitive, and antisymmetric.
	Explicitly, for all \( x, y, z \in S \), we have
	\[ x \preceq x;\quad x \preceq y, y \preceq z \implies x \preceq z;\quad x \preceq y, y \preceq x \implies z = y \]
	We say \( (S, \preceq) \) is a \emph{partially ordered set}, or a \emph{poset}.
	It is \emph{totally ordered} if the order is total; \( x \preceq y \) or \( y \preceq x \) for all \( x, y \in S \).
\end{definition}
\begin{definition}
	Let \( S \) be a partially ordered set.
	A \emph{chain} in \( S \) is a totally ordered subset.
	An \emph{upper bound} for a subset \( T \) of \( S \) is an element \( z \in S \) such that for all \( x \in T \), we have \( x \preceq z \).
	A \emph{maximal element} of \( S \) is an element \( y \in S \) such that for all \( x \in S \), \( y \preceq x \) implies \( y = x \).
\end{definition}
If \( S \) is totally ordered, \( S \) has at most one maximal element.
\begin{lemma}[Zorn]
	Let \( S \) be a nonempty partially ordered set.
	Suppose that every chain in \( S \) has an upper bound in \( S \).
	Then \( S \) has a maximal element.
\end{lemma}
This can be proven using the axiom of choice.
\begin{example}
	Let \( V \) be a vector space over \( K \).
	Then \( V \) has a basis; a set \( B \subseteq V \) such that any finite subset of \( B \) is linearly independent, and for all \( v \in V \), there exists \( b_1, \dots, b_k \in B \) and \( a_1, \dots, a_k \in K \) such that \( v = \sum_{i=1}^k a_i b_i \).
	If \( V = \qty{0} \), the result is trivial by taking \( V = \varnothing \).
	Otherwise, let \( S \) be the set of all subsets \( X \subseteq V \) where finite subsets of \( X \) are linearly independent.
	\( S \) is ordered by inclusion; this is a partial order.
	\( S \) is nonempty since \( V \neq \qty{0} \).
	Each chain \( T \subseteq S \) has an upper bound by taking its union \( Y = \bigcup_{X \in T} X \).
	This upper bound indeed lies in \( S \), since we only need to check finite subsets of \( Y \) for linear independence.
	Then by Zorn's lemma, \( S \) has a maximal element \( B \), which can be seen to be a basis.
\end{example}
\begin{proposition}
	Let \( L / K \) be an algebraic extension, and let \( M \) be algebraically closed.
	Let \( \sigma \colon K \to M \).
	Then there exists \( \overline \sigma \colon L \to M \) extending \( \sigma \).
\end{proposition}
\begin{proof}
	First, consider the case \( L = K(x) \) where \( x \) is algebraic over \( K \) with minimal polynomial \( m_{x,K} = f \).
	Then \( \sigma f \in M[T] \).
	Since \( M \) is algebraically closed, \( \sigma f \) splits in \( M \).
	Therefore there exists such a \( \overline \sigma \colon K(x) \to M \) extending \( \sigma \).
	We can obtain one homomorphism for each root of \( \sigma f \) in \( M \).

	Now consider the general case.
	Suppose \( K \subseteq L \) without loss of generality, by replacing \( K \) with its image in \( L \).
	Let
	\[ S = \qty{(F,\tau) \midd K \subseteq F \subseteq L, \tau \colon F \to M, \eval{\tau}_K = \sigma} \]
	This has a partial order given by \( (F,\tau) \preceq (F',\tau') \) where \( F \subseteq F' \) and \( \eval{\tau'}_F = \tau \).
	Therefore, \( S \) is a partially ordered set.
	It contains \( (K, \sigma) \), so it is not empty.

	Let \( T = (F_i, \tau_i)_{i \in I} \) be a chain in \( S \).
	If \( T \) is empty, we can vacuously upper bound it with \( (K, \sigma) \).
	Otherwise, we define \( F' = \bigcup_{i \in I} F_i \).
	This is a field since \( T \) is a chain; in particular, for all \( i, j \in I \), we have either \( F_i \subseteq F_j \) or \( F_j \subseteq F_i \).
	Now define \( \tau' \colon F' \to M \) by mapping \( x \) to \( \tau_i(x) \) where \( x \in \tau_i \); this is independent of the choice of \( i \) since \( \eval{\tau_j}_{F_i} = \tau_i \) and \( T \) is a chain.
	This is an upper bound in \( S \) for the chain.

	Then, by Zorn's lemma, \( S \) has a maximal element.
	Let \( (F, \tau) \) be this maximal element.
	We will show \( F = L \); in this case, \( \tau = \overline \sigma \) is an extension as required.

	Clearly \( F \subseteq L \).
	If \( x \in L \), then by the first part applied to \( F(x) / F \), we can extend the homomorphism \( \tau \colon F \to M \) into a homomorphism \( \overline \tau \colon F(x) \to M \).
	Then \( (F(x), \overline \tau) \in S \), and \( (F,\tau) \preceq (F(x), \overline \tau) \).
	By maximality, \( F(x) = F \), so \( x \in F \).
	Hence \( F = L \) as required.
\end{proof}

\subsection{Algebraic closures of general fields}
One can construct an algebraic closure of a field using Zorn's lemma, obtaining a field that extends all algebraic extensions of a given field.
However, difficulties arise since the class of algebraic extensions of a field does not form a set.
Zorn's lemma can be utilised inside a suitably well-behaved set, but instead, we will construct the algebraic closure via the maximal ideal theorem.
\begin{theorem}[maximal ideal theorem]
	Let \( R \) be a non-zero commutative ring with a 1.
	Then \( R \) has a maximal ideal.
\end{theorem}
\begin{proof}[Proof sketch]
	Let \( S \) be the set of all proper ideals \( I \vartriangleleft R \), partially ordered by inclusion.
	A maximal ideal is a maximal element of \( S \).
	We apply Zorn's lemma.
	Let \( T \) be a nonempty chain, since anything is an upper bound for an empty chain.
	Then \( J = \bigcup_{I \in T} I \) is an ideal.
	As \( 1 \not\in I \) for all \( I \in T \), we conclude \( 1 \not\in J \).
	So \( J \) is a proper ideal, and hence is an upper bound.
\end{proof}
\begin{theorem}
	Let \( K \) be a field.
	Then \( K \) has an algebraic closure \( \overline K \).
	If \( \sigma \colon K \to K' \) is an isomorphism, and \( \overline K, \overline K' \) are any algebraic closures of \( K, K' \), then \( \sigma \) extends to an isomorphism \( \overline \sigma \colon \overline K \to \overline K' \).
\end{theorem}
\begin{remark}
	The extension \( \overline \sigma \) is not generally unique.
\end{remark}
\begin{proof}
	We begin by proving the existence of the algebraic closure.
	Let \( P \) be the set of monic irreducible polynomials in \( K[T] \), and construct \( K_1 \) such that every \( f \in P \) has a root in \( K_1 \).
	First, we will find a ring in which every \( f \in P \) has a root.

	Let \( R = K\qty[\qty{T_f}_{f \in P}] \) be the set of finite \( K \)-linear combinations of monomials \( T_{f_1}^{m_1} \dots T_{f_k}^{m_k} \) for \( f_i \in P \).
	Let \( I \) be the ideal generated by \( f(T_f) \) for each \( f \in P \).
	Now, in \( \faktor{R}{I} \), \( T_f + I \) is a root of \( f \).

	We must check that \( I \neq R \).
	If \( I = R \), then in particular \( 1 \in I \).
	In other words, for some finite subset \( Q \subseteq P \), there exists \( r_f \in R \) for \( f \in Q \) such that \( 1 = \sum_{f \in Q} r_f f(T_f) \).
	Enlarging \( Q \) if necessary, we can assume that each \( r_f \) is a polynomial in \( \qty{T_g \mid g \in Q} \).
	Let \( L / K \) be a splitting field for \( \prod_{f \in Q} f \), and \( a_f \in L \) be a root of \( f \) for each \( f \in Q \).
	Consider the homomorphism \( \varphi \colon R \to L \) such that \( \eval{\varphi}_K = \mathrm{id} \) and \( \varphi(T_f) = a_f \) for \( f \in Q \), and \( \varphi(T_f) = 0 \) for \( f \not\in Q \).
	Then
	\[ 1 = \varphi(1) = \sum_{f \in Q} \varphi(r_f f(T_f)) = \sum_{f \in Q} \varphi(r_f) f(a_f) = 0 \]
	This is a contradiction, so \( I \) is in fact a proper ideal.

	By the maximal ideal theorem, the ring \( \faktor{R}{I} \) has a maximal ideal \( \overline J \).
	Equivalently, there exists a maximal ideal \( J \) of \( R \) containing \( I \), since the ideals of \( \faktor{R}{I} \) are in bijection with the ideals of \( R \) containing \( I \) by the isomorphism theorem.
	Now let \( K_1 = \faktor{R}{J} \).
	This is a field since \( J \) is maximal.
	Let \( x_f = T_f + J \in K_1 \), then \( K_1 / K \) is generated by the \( x_f \), and \( f(x_f) = 0 \) by construction.
	So \( K_1 / K \) is an algebraic extension of \( K \) in which every \( f \in P \) has a root.

	Let \( P_1 \) be the set of monic irreducibles in \( K_1[T] \).
	We apply the same procedure to \( K_1 \) and \( P_1 \) to obtain a field \( K_2 \), and so on.
	We then obtain a tower \( K \subseteq K_1 \subseteq K_2 \subseteq \cdots \) such that if \( f \in K_n[T] \) is non-constant, it has a root in \( K_{n+1} \).

	Now, suppose \( f \in K[T] \) is non-constant.
	Then we can write \( f = (T-x_1)f_1 \) where \( x_1 \in K_1, f_1 \in K_1[T] \), and so on.
	So \( f \) splits in \( K_{\deg f - 1} \).
	Therefore, the union \( \bigcup_{n \in \mathbb N} K_n \) is algebraically closed, and hence is an algebraic closure of \( K \).

	We now prove uniqueness.
	Let \( K \subseteq \overline K \) and \( K' \subseteq \overline K' \) be algebraic closures, and let \( \sigma \colon K \to K' \) be an isomorphism.
	Then by the previous result, as \( \overline K / K \) is algebraic, \( \sigma \) extends to a homomorphism \( \overline \sigma \colon \overline K \to \overline K' \).
	It suffices to show that \( \sigma \) is an isomorphism.
	We have \( K' \subseteq \sigma(\overline K) \subseteq \overline K' \), so \( \overline K' / \sigma(\overline K) \) is algebraic.
	\( \overline K \) is algebraically closed, so \( \sigma(\overline K) \) is also algebraically closed.
	So \( \overline K' = \sigma(\overline K) \) by part (iii) of a previous result.
\end{proof}
